home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
files
/
text
/
misc
/
cvt
/
scripts
/
ebcdic->ascii.cvt
< prev
next >
Wrap
Text File
|
1993-12-31
|
3KB
|
137 lines
/*
* EBCDIC -> ASCII
*
* Taken from Lou Seigal's "EBCDIC.PAS" as of 11/29/86
*
* This program was developed out of a need to convert IBM mainframe
* data stored in EBCDIC format into data that could easily be imported
* to DBASE III and/or DBASE III+. I used the Black Box catalog for the
* code conversions from EBCDIC to ASCII. Be sure that your data does
* not contain any COMP3 or COMP fields (packed numeric). This program
* will not handle those.
*/
$C1 -> 65; // lhs is EBCDIC, rhs is ASCII
$C2 -> 66;
$C3 -> 67;
$C4 -> 68;
$C5 -> 69;
$C6 -> 70;
$C7 -> 71;
$C8 -> 72;
$C9 -> 73;
$D1 -> 74;
$D2 -> 75;
$D3 -> 76;
$D4 -> 77;
$D5 -> 78;
$D6 -> 79;
$D7 -> 80;
$D8 -> 81;
$D9 -> 82;
$E2 -> 83;
$E3 -> 84;
$E4 -> 85;
$E5 -> 86;
$E6 -> 87;
$E7 -> 88;
$E8 -> 89;
$E9 -> 90;
$81 -> 97;
$82 -> 98;
$83 -> 99;
$84 -> 100;
$85 -> 101;
$86 -> 102;
$87 -> 103;
$88 -> 104;
$89 -> 105;
$91 -> 106;
$92 -> 107;
$93 -> 108;
$94 -> 109;
$95 -> 110;
$96 -> 111;
$97 -> 112;
$98 -> 113;
$99 -> 114;
$A2 -> 115;
$A3 -> 116;
$A4 -> 117;
$A5 -> 118;
$A6 -> 119;
$A7 -> 120;
$A8 -> 121;
$A9 -> 122;
$F0 -> 48;
$F1 -> 49;
$F2 -> 50;
$F3 -> 51;
$F4 -> 52;
$F5 -> 53;
$F6 -> 54;
$F7 -> 55;
$F8 -> 56;
$F9 -> 57;
$40 -> 32;
$5A -> 33;
$7F -> 34;
$7B -> 35;
$5B -> 36;
$6C -> 37;
$50 -> 38;
$7D -> 39;
$4D -> 40;
$5D -> 41;
$5C -> 42;
$4E -> 43;
$6B -> 44;
$60 -> 45;
$4B -> 46;
$61 -> 47;
$7A -> 58;
$5E -> 59;
$4C -> 60;
$7E -> 61;
$6E -> 62;
$6F -> 63;
$7C -> 64;
$E0 -> 92;
$6D -> 95;
$C0 -> 123;
$6A -> 124;
$D0 -> 125;
$A1 -> 126;
$4A -> 155;
$5F -> 191;
$2E -> 6;
$2F -> 7;
$16 -> 8;
$18 -> 24;
$0D -> 13;
$11 -> 17;
$12 -> 18;
$13 -> 19;
$3C -> 20;
$07 -> 127;
$10 -> 16;
$19 -> 25;
$2D -> 5;
$37 -> 4;
$27 -> 27;
$26 -> 23;
$03 -> 3;
$0C -> 12;
$22 -> 28;
$05 -> 9;
$25 -> 10;
$3D -> 21;
$00 -> 0;
$35 -> 30;
$0F -> 15;
$0E -> 14;
$01 -> 1;
$02 -> 2;
$32 -> 22;
$0B -> 11;